<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="node_modules/vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <login></login>
    </div>
    <template id="outtemplate">
        <form>
            {{name}}:<input type="text" /> <br/>
            密码:<input type="password" /> <br/>
            <input type="submit" value="登录" />
        </form>

    </template>
</body>
    <script>
        new Vue({
            el:"#app",
            data:{},
            components:{
                "login":{
                    template:"#outtemplate",
                    data(){
                        return{
                            name:"用户名"
                        }

                    }
                }
            }


        })

    </script>
</html>